package com.dfqy.dao;

import com.dfqy.pojo.Join;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

/**
 * Author : atyushu
 * Package : com.dfqy.dao
 * ClassName : JoinDao
 * Create : 2023/8/2 - 9:10
 * Version : v1.0
 * Description : The interface of dao for join.
 */
@Component
public interface JoinDao {

    int insert(Join join);

    int delete(long... id);

    int update(Join join);

    Join getById(long id);

    int countByLike(@Param("jointimeStart") Date jointimeStart, @Param("jointimeEnd") Date jointimeEnd, @Param("phone") String phone, @Param("uname") String uname, @Param("isattend") byte isattend, @Param("eventid") long eventid);

    List<Join> page(@Param("no") int pageNo, @Param("size") int pageSize, @Param("jointimeStart") Date jointimeStart, @Param("jointimeEnd") Date jointimeEnd, @Param("phone") String phone, @Param("uname") String uname, @Param("isattend") byte isattend, @Param("eventid") long eventid);

    int absent(long id);

    int attend(long id);

    List<Join> getByEventId(@Param("no") int pageNo, @Param("size") int pageSize,@Param("eventid") long eventid);

    int countByEventId(@Param("eventid") long eventid);
}